﻿using System;
using System.Collections.Generic;
using System.Text;

namespace hoemwork
{
    public class Score
    {
        private double _score;
        public Score(double score)
        {
            _score = score;
        }
        public ScoreGrade Transefer()
        {
            if (_score > 100 || _score < 0)
            {
                throw new ArgumentException($"输入{_score}值超出范围");
            }
            if (_score > 80)
            {
                return ScoreGrade.excellent;
            }
            else if (_score > 60)
            {
                return ScoreGrade.Passed;
            }
            else
            {
                return ScoreGrade.Failed;
            }
        }
    }
    public enum ScoreGrade
    {
        excellent,
        Passed,
        Failed

    }
}
